syn keyword phtmlFunctions reg_Match reg_replace reg_Search Rename Reset return contained
syn keyword phtmlFunctions rewind rewindDir RmDir rSort SetCookie SetErrorReporting contained
syn keyword phtmlFunctions SetLogging SetShowInfo SetType shl shr Sin Sleep contained
syn keyword phtmlFunctions Solid_Close Solid_Connect Solid_Exec Solid_FetchRow contained
syn keyword phtmlFunctions Solid_FieldName Solid_FieldNum Solid_FreeResult contained
syn keyword phtmlFunctions Solid_NumFields Solid_NumRows Solid_Result Sort contained
syn keyword phtmlFunctions Spundtex Sprintf Sqrt Srand strchr strtr contained
syn keyword phtmlFunctions StripSlashes strlen strchr strstr strtok strtolower contained
syn keyword phtmlFunctions strtoupper strval substr sybSQL_CheckConnect contained
syn keyword phtmlFunctions sybSQL_DBUSE sybSQL_Connect sybSQL_Exit contained
syn keyword phtmlFunctions sybSQL_Fieldname sybSQL_GetField sybSQL_IsRow contained
syn keyword phtmlFunctions sybSQL_NextRow sybSQL_NumFields sybSQL_NumRows contained
syn keyword phtmlFunctions sybSQL_Query sybSQL_Result sybSQL_Result sybSQL_Seek contained
syn keyword phtmlFunctions Symlink syslog System Tan TempNam Time Umask UniqId contained
syn keyword phtmlFunctions Unlink Unset UrlDecode UrlEncode USleep Virtual contained
syn keyword phtmlFunctions SecureVar contained
" Conditional
syn keyword phtmlConditional if else elseif endif switch endswitch contained
" Repeat
syn keyword phtmlRepeat while endwhile contained
" Repeat
syn keyword phtmlLabel case default contained
" Statement
syn keyword phtmlStatement break return continue exit contained
" Operator
syn match phtmlOperator "[-=+%^&|*!]" contained
syn match phtmlOperator "[-+*/%^&|]=" contained
syn match phtmlOperator "/[^*]"me=e-1 contained
syn match phtmlOperator "\$" contained
syn match phtmlRelation "&&" contained
syn match phtmlRelation "||" contained
syn match phtmlRelation "[!=<>]=" contained
syn match phtmlRelation "[<>]" contained
" Identifier
syn match phtmlIdentifier "$\h\w*" contained contains=phtmlEnvVar,phtmlIntVar,phtmlOperator
" Include
syn keyword phtmlInclude include contained
" Definesag
syn keyword phtmlDefine Function contained
" String
syn region phtmlString keepend matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=phtmlIdentifier,phtmlSpecialChar,@phtmlSql contained
" Number
syn match phtmlNumber "-\=\<\d\+\>" contained
" Float
syn match phtmlFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" contained
" SpecialChar
syn match phtmlSpecialChar "\\[abcfnrtyv\\]" contained
syn match phtmlSpecialChar "\\\d\{3}" contained contains=phtmlOctalError
syn match phtmlSpecialChar "\\x[0-9a-fA-F]\{2}" contained
syn match phtmlOctalError "[89]" contained
syn match phtmlParentError "[)}\]]" contained
" Todo
syn keyword phtmlTodo TODO Todo todo contained
" Parents
syn cluster phtmlInside contains=phtmlComment,phtmlFunctions,phtmlIdentifier,phtmlConditional,phtmlRepeat,phtmlLabel,phtmlStatement,phtmlOperator,phtmlRelation,phtmlString,phtmlNumber,phtmlFloat,phtmlSpecialChar,phtmlParent,phtmlParentError,phtmlInclude
syn cluster phtmlTop contains=@phtmlInside,phtmlInclude,phtmlDefine,phtmlParentError,phtmlTodo
syn region phtmlParent matchgroup=Delimiter start="(" end=")" contained contains=@phtmlInside
syn region phtmlParent matchgroup=Delimiter start="{" end="}" contained contains=@phtmlInside
syn region phtmlParent matchgroup=Delimiter start="\[" end="\]" contained contains=@phtmlInside
syn region phtmlRegion keepend matchgroup=Delimiter start="<?" skip=+(.*>.*)\|".\{-}>.\{-}"\|/\*.\{-}>.\{-}\*/+ end=">" contains=@phtmlTop
syn region phtmlRegionInsideHtmlTags keepend matchgroup=Delimiter start="<?" skip=+(.*>.*)\|/\*.\{-}>.\{-}\*/+ end=">" contains=@phtmlTop contained
" sync
if exists("phtml_minlines")
exec "syn sync minlines=" . phtml_minlines
else
syn sync minlines=100
endif
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_phtml_syn_inits")